package com.itheima.spring.tuling.iocbeanlifecicle;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainStarter {

	public static void main(String[] args)   {
		// 加载spring上下文
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MainConfig.class);

		Car car =  (Car) context.getBean("car");
		System.out.println(car.getName());
	}
}
